package com.itheima.controller;

import com.itheima.common.entity.PageResult;
import com.itheima.common.entity.QueryPageBean;
import com.itheima.common.entity.Result;
import com.itheima.common.entity.Result2;
import com.itheima.pojo.Setmeal;
import com.itheima.service.SetmealService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 套餐管理
 */
@RestController
@Slf4j
@RequestMapping("/setmeal")
public class SetmealController {


  /*  @Autowired
    private SetmealService setmealService;*/

  /*  *//**
     * 用户端查询套餐详情
     * @param id
     * @return
     *//*
    @PostMapping("/findById")
    public Result2 findById(Integer id){
        log.info("查询套餐详情：{}",id);
        Setmeal setmeal = setmealService.findById(id);
        return new Result2(true,"查询成功",setmeal);
    }
    *//**
     * 用户端查询所有套餐
     * @return
     *//*
    @PostMapping("/getSetmeal")
    public Result2 getSetmeal(){
        log.info("查询所有套餐");
        List<Setmeal> list = setmealService.getAll();
        return new Result2(true,"查询成功",list);
    }*/
}
